package ${classPath};

import java.time.LocalDate;
import java.util.Date;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
${classComment}值对象
*/

@Data
@ToString
@NoArgsConstructor
@ApiModel(value = "${classComment}值对象")
public class ${domain}Vo {

<#list fieldList as field>
  /** ${field.comment} */
<#if field.type?starts_with("LocalDateTime")>
  @Excel(name = "${field.comment}", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
<#elseif field.type?starts_with("LocalDate") >
  @Excel(name = "${field.comment}", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
<#else>
  @Excel(name = "${field.comment}")
</#if>
  @ApiModelProperty(value = "${field.comment}")
  private ${field.type} ${field.name};

</#list>

  /** 创建时间 */
  @ApiModelProperty(value = "创建时间")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date createTime;


 <#assign domainInstance="${domain?substring(0,1)?lower_case}${domain?substring(1)}"/>


  public ${domain}Vo(${domain} ${domainInstance}) {
    super();
    this.id = ${domainInstance}.getId();
    <#list fieldList as field>
    this.${field.name} = ${domainInstance}.get${field.name?cap_first}();
    </#list>
    this.createTime = ${domainInstance}.getCreateTime();
  }
}